/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package service.impl;

import java.util.List;
import pojo.Pointdispatchhistory;
import service.IPointService;

/**
 *
 * @author administrator
 */
public class PointServiceImpl <T extends Pointdispatchhistory> extends ServiceImpl<T>
                 implements IPointService<T> {
    public List<T> listPoint(String uni,int offset, int pageSize)
    {
        return this.getDao().list("select p from Pointdispatchhistory p "
                + " where p.user.unikey = '" + uni + "' order by p.pointDispatchDate desc",
                offset, pageSize, null);
    }

    public int count(String uni)
    {
        return this.getTotalCount("select count(p) from Pointdispatchhistory p "
                + " where p.user.unikey = '" + uni + "'", null);
    }

    public void createNewHistory(T Pointdispatchhistory)
    {
        this.getDao().create(Pointdispatchhistory);
    }
}
